/**
 * losenote.com Inc.
 * Copyright (c) 2013-2013 All Rights Reserved.
 */
package com.losenote.core.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.losenote.core.ContactDetailComponent;
import com.losenote.model.ContactDetail;
import com.losenote.model.ct.ContactDetailConvertor;
import com.losenote.orm.ContactDetailDO;
import com.losenote.orm.ContactDetailDODAO;

/**
 * 
 * @author danjingyu
 * @version $Id: ContactDetailComponentImpl.java, v 0.1 2013-10-28 下午11:00:18 danjingyu Exp $
 */
public class ContactDetailComponentImpl implements ContactDetailComponent {

    /**quesiont操作**/
    @Autowired
    private ContactDetailDODAO contactDetailDODAO;

    /** 
     * @see com.losenote.core.ContactDetailComponent#getById(int)
     */
    @Override
    public ContactDetail getById(int id) {
        ContactDetailDO contactDetailDo = contactDetailDODAO.selectByPrimaryKey(id);
        return ContactDetailConvertor.fromDO(contactDetailDo);
    }

    public void setContactDetailDODAO(ContactDetailDODAO contactDetailDODAO) {
        this.contactDetailDODAO = contactDetailDODAO;
    }

}
